/*
 * Event.h
 *
 *  Created on: Apr 15, 2009
 *      Author: wrice
 */

#ifndef EVENT_H_
#define EVENT_H_

#include "DOMEvent.h"
namespace DOMEvent {

class Event {
	// http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event
public:
	virtual void initEvent(DOMString eventTypeArg, bool canBubbleArg, bool cancelableArg) = 0;
	virtual void stopPropagation() = 0;
	virtual void preventDefault() = 0;

	virtual DOMString getType() const = 0;
	virtual EventTarget * getTarget() const = 0;
	virtual EventTarget * getCurrentTarget() const = 0;
	virtual unsigned short getEventPhase() const = 0;
	virtual bool isBubbles() const = 0;
    virtual bool isCancelable() const = 0;
    virtual DOMTimeStamp getTimeStamp() const = 0;

    enum {
    	CAPTURING_PHASE = 1,
		AT_TARGET = 2,
		BUBBLING_PHASE = 3
    };

public: virtual ~Event() {}
};

}

#endif /* EVENT_H_ */
